//import request from '@/utils/request'
import { request } from '@/api/service'
export const urlPrefix = '/api/test/schedule/'
// 查询项目列表
export function listSchedule(query) {
  return request({
    url: urlPrefix,
    method: 'get',
    params: query
  })
}

// 查询项目详细
export function getSchedule(scheduleId) {
  return request({
    url: '/schedule/schedule/' + scheduleId + '/',
    method: 'get'
  })
}

// 新增项目
export function addSchedule(data) {
  return request({
    url: '/schedule/schedule/',
    method: 'post',
    data: data
  })
}

// 修改项目
export function updateSchedule(data) {
  return request({
    url: '/schedule/schedule/' + data.id + '/',
    method: 'put',
    data: data
  })
}

// 删除项目
export function delSchedule(scheduleId) {
  return request({
    url: '/schedule/schedule/' + scheduleId + '/',
    method: 'delete'
  })
}

// 导出项目
export function exportSchedule(query) {
  return request({
    url: '/schedule/schedule/export/',
    method: 'get',
    params: query
  })
}

// 下载项目导入模板
export function importTemplate() {
  return request({
    url: '/schedule/schedule/importTemplate/',
    method: 'get'
  })
}

// 项目导入
export function importsSchedule(data) {
  return request({
    url: '/schedule/schedule/importTemplate/',
    method: 'post',
    data: data
  })
}
